package com.poisonh.unifiedauth.ui.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.poisonh.unifiedauth.R;

/**
 * Created by PoisonH on 2016/7/4.
 */
public abstract class BaseCardFragment extends Fragment
{
    private int  layoutSourceId = 0;

    public BaseCardFragment(int layoutSourceId){
        this.layoutSourceId = layoutSourceId;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        return inflater.inflate(layoutSourceId, null);
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState)
    {
        super.onViewCreated(view, savedInstanceState);
        bindData(view, savedInstanceState);
    }
    protected abstract void bindData(View view, Bundle savedInstanceState);

}
